<?php
	@$cmd = $_GET['cmd'];
	$TITLE = 'Welcome';
	$NAV = '» Welcome';
	$PATH = 'subs/admin_home.php';
	$home_active = 'class="first"';
	$intro_active = '';
	$prod_active = '';
	$add_prod_active = '';
	$man_prod_active = '';
	$cat_prod_active = '';
	$proj_active = '';
	$add_proj_active = '';
	$man_proj_active = '';
	$service_active = '';
	$contact_active = '';
	$info_active = '';
	$footer_active = '';
	$slide_show_active = '';
	$upload_pic_active = '';
	include_once('libs/htdu_core.php');
	$exec_mysql = new execute_mysql_query();

	switch($cmd)
	{
		case '1':
		$TITLE = 'Trang chủ';
		$NAV = '» Trang chủ';
		$home_active = 'class="first active"';
		$PATH = 'subs/admin_index.php';
		break;
		case '2':
		$TITLE = 'Giới thiệu';
		$NAV = '» Giới thiệu';
		$intro_active = 'class="active"';
		$PATH = 'subs/admin_intro.php';
		break;
		case '3.1':
		$TITLE = 'Thêm mới sản phẩm';
		$NAV = '» Sản phẩm » Thêm mới sản phẩm';
		$prod_active = 'class="active"';
		$add_prod_active = 'class="active"';
		$PATH = 'subs/admin_add_product.php';
		break;
		case '3.2':
		$TITLE = 'Quản lý sản phẩm';
		$NAV = '» Sản phẩm » Quản lý sản phẩm';
		$prod_active = 'class="active"';
		$man_prod_active = 'class="active"';
		$PATH = 'subs/admin_man_product.php';
		break;
		case '3.3':
		$TITLE = 'Quản lý danh mục sản phẩm';
		$NAV = '» Sản phẩm » Quản lý danh mục sản phẩm';
		$prod_active = 'class="active"';
		$cat_prod_active = 'class="active"';
		$PATH = 'subs/admin_category_product.php';
		break;
		case '4.1':
		$TITLE = 'Thêm mới dự án';
		$NAV = '» Dự án » Thêm mới dự án';
		$proj_active = 'class="active"';
		$add_proj_active = 'class="active"';
		$PATH = 'subs/admin_add_project.php';
		break;
		case '4.2':
		$TITLE = 'Quản lý dự án';
		$NAV = '» Dự án » Quản lý dự án';
		$proj_active = 'class="active"';
		$man_proj_active = 'class="active"';
		$PATH = 'subs/admin_man_project.php';
		break;
		case '4.3':
		$TITLE = 'Cập nhật dự án';
		$NAV = '» Dự án » Cập nhật dự án';
		$proj_active = 'class="active"';		
		$PATH = 'subs/admin_add_project.php';
		break;
		case '5':
		$TITLE = 'Dịch vụ';
		$NAV = '» Dịch vụ';
		$service_active = 'class="active"';
		$PATH = 'subs/admin_service.php';
		break;
		case '6':
		$TITLE = 'Liên hệ';
		$NAV = '» Liên hệ';
		$contact_active = 'class="active"';
		$PATH = 'subs/admin_contact.php';
		break;
		case '6.1':
		$TITLE = 'Liên hệ';
		@$id_contact = $_GET['id'];
		$title_cont = $exec_mysql->execute("select description from node where id = $id_contact", 1);
		$NAV = '» Liên hệ » '.$title_cont;
		$contact_active = 'class="active"';
		$PATH = 'subs/admin_contact_view.php';
		break;
		case '7':
		$TITLE = 'Thông tin doanh nghiệp';
		$NAV = '» Thông tin doanh nghiệp';
		$info_active = 'class="active"';
		$PATH = 'subs/admin_infomation.php';
		break;
		case '8':
		$TITLE = 'Footer site';
		$NAV = '» Footer site';
		$footer_active = 'class="active"';
		$PATH = 'subs/admin_footer.php';
		break;
		case '9':
		$TITLE = 'Slide show';
		$NAV = '» Slide show';
		$slide_show_active = 'class="active"';
		$PATH = 'subs/admin_slideshow.php';
		break;
		case '10':
		$TITLE = 'Upload ảnh';
		$NAV = '» Upload ảnh';
		$upload_pic_active = 'class="active"';
		$PATH = 'subs/admin_upload_img.php';
		break;
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title><?php echo @$TITLE; ?> - DKT Group Website Manager System</title>
        <link rel="stylesheet" type="text/css" href="css/admin_layout.css" />
        <link rel="stylesheet" type="text/css" href="css/control.css" />
        <script type="text/javascript" src="js/jquery-1.5.2.min.js"></script>
        <script type="text/javascript" src="js/admin_master_script.js"></script>
        <script type="text/javascript" src="admin_ckeditor/ckeditor.js"></script>
    </head>
    
    <body>
    	<!--alert dialog-->
        <div class="alert-dialog" id="alert-dialog">
        	<div class="alert-dialog-window">
            	<p class="alert-dialog-window-title" id="window-title">Window title</p>
               	<p class="alert-dialog-window-content" id="window-message">Window message here</p>
                <button class="alert-dialog-window-footer" id="positive-button" onclick="hideAlert()">OK</button>  
            </div>
        </div>
        <!--confirm dialog-->
        <div class="alert-dialog" id="confirm-dialog">
        	<div class="alert-dialog-window">
            	<p class="alert-dialog-window-title" id="confrim-window-title">Window title</p>
               	<p class="alert-dialog-window-content" id="confrim-window-message">Window message here</p>
                <button class="confirm-dialog-window-footer-yes" id="button-yes" onclick="hideConfirmAlert()">Yes</button>
                <button class="confirm-dialog-window-footer-no" id="button-no" onclick="hideConfirmAlert()">No</button>  
            </div>
        </div>
    	<!--header-->
        <div class="header">
        	<div class="header-containt">
            	<span class="logo"><a href="admin_master_page.php">Partition WC Managerment</a></span>
                <span class="admin-panel">Change password | Log out</span>
            </div>
        </div>
        <!--body contain-->
        <div class="body-contain">
        	<div class="fun-panel">
            	<div class="fun-title">
                	MENU FUNCTIONS
                </div>
                
                <ul class="ul-list-fun">
                	<li <?php echo $home_active; ?>><a href="admin_master_page.php?cmd=1">Trang chủ</a></li>
                    
                    <li <?php echo $prod_active; ?>>
                    	Sản phẩm
                        <ul>
                        	<li <?php echo $add_prod_active; ?>><a href="admin_master_page.php?cmd=3.1">Thêm mới sản phẩm</a></li>
                            <li <?php echo $man_prod_active; ?>><a href="admin_master_page.php?cmd=3.2">Quản lý sản phẩm</a></li>
                            <li <?php echo $cat_prod_active; ?>><a href="admin_master_page.php?cmd=3.3">Danh mục sản phẩm</a></li>
                        </ul>
                    </li>
                    <li <?php echo $proj_active; ?>>
                    	Dự án
                        <ul>
                        	<li <?php echo $add_proj_active; ?>><a href="admin_master_page.php?cmd=4.1">Thêm mới dự án</a></li>
                            <li <?php echo $man_proj_active; ?>><a href="admin_master_page.php?cmd=4.2">Quản lý dự án</a></li>
                        </ul>
                    </li>
                    
                    <li <?php echo $contact_active; ?>><a href="admin_master_page.php?cmd=6">Liên hệ</a></li>
                    <li <?php echo $info_active; ?>><a href="admin_master_page.php?cmd=7">Thông tin doanh nghiệp</a></li>
                    <li <?php echo $slide_show_active; ?>><a href="admin_master_page.php?cmd=9">Slide show</a></li>
                    <li <?php echo $upload_pic_active; ?>><a href="admin_master_page.php?cmd=10">Upload ảnh</a></li>
                </ul>
            </div>
            <div class="contain-panel">
            	<div class="navigative-panel">
                	<span><?php echo $NAV; ?></span>
                </div>
               	<div class="contain">
                	<?php include_once($PATH); ?>
                </div>
            </div>
        </div>
        <!--footer-->
        <div class="footer">
        	<p>Copyright &copy; 2013 DKT Group Website Manager System&trade;</p>
        </div>
    </body>
</html>